fix: reduce recording verification work and repeated transfers - #2232
Merged
Conversation
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Large recordings currently decode both the source and the remuxed output, and can repeat transfers after transient failures. This adds a preservation proof over encoded packet bytes, codec configuration and timing so compatible recordings need one complete output decode. The existing decoded-source verification remains the fallback for unsupported container timing. Actual packet changes and corrupt output still fail closed. The remux now explicitly preserves the stored final audio packet duration, avoiding FFmpeg nominal-duration substitution that otherwise forces the slow fallback. Audio metadata inspection runs in a bounded, cancellable subprocess; real blocked-file tests verify cancellation and deadline cleanup.
Pinned Drive downloads and remote output checksum reads resume from the last verified byte within a bounded attempt budget. Decode progress advances from real frames, stalled decoders are terminated, and worker logs record verification duration and method. Upload identity checks, ownership fences and publication receipts remain in place.
Validation:
This changes only the media server; no PlanetScale migration or Vercel function changes are required. It does not add durable checkpoints across worker restarts. Production deployment and recovery of the remaining large recordings still need live verification after CI and review.
Greptile Summary
This PR reduces recording verification work by proving preservation of encoded packet content, codec configuration, and timing before performing one complete output decode. It also preserves terminal audio duration during remuxing, resumes interrupted transfers and checksum reads, bounds retries and decoder stalls, and improves verification progress and logging.
Confidence Score: 5/5
The PR appears safe to merge with no actionable new defects identified.
The latest changes replace potentially uninterruptible in-process audio inspection with a managed subprocess that is killed and joined on cancellation, while the supported Bun deployments retain and can execute the helper TypeScript file. The three previous findings were manually resolved without explanatory replies and therefore are not outstanding.
Important Files Changed
Reviews (5): Last reviewed commit: "fix: terminate stalled audio timing insp..." | Re-trigger Greptile